package com.finesys.backend.common.model.org;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.apache.ibatis.type.Alias;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * @description: 组织结构管理
 * @author: wxj
 * @create: 2020-11-11
 **/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Alias("org")
public class OrgModel implements Serializable {

    @ApiModelProperty("id")
    @Length(max = 64, message = "id不能超过64字符")
    private String id;

    @ApiModelProperty("名称")
    @NotBlank(message = "名称不能为空")
    @Length(max = 64, message = "名称不能超过64字符")
    private String name;

    @ApiModelProperty("父id")
    @Length(max = 64, message = "父id不能超过64字符")
    private String pid;

    @ApiModelProperty("是否有子结构")
    private boolean hasChildren = false;

}
